package com.baidu.eureka.entity;

import com.baomidou.mybatisplus.annotation.*;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.*;

import java.time.LocalDateTime;
import java.util.Date;
import java.io.Serializable;
import java.util.List;

/**
 * (User)实体类
 *
 * @author makejava
 * @since 2020-07-18 00:11:41
 */
@ApiModel("用户类")
@Data
@AllArgsConstructor
@NoArgsConstructor
@ToString
@Builder
@TableName(value = "user")
public class User implements Serializable {
    private static final long serialVersionUID = 182540542966109656L;
    /**
     * 用户主键id
     */
    @ApiModelProperty(value = "主键id")
    @TableId(value = "id", type = IdType.ASSIGN_ID)
    private Long id;
    /**
     * 账号
     */
    @ApiModelProperty(value = "账号")
    @TableField(value = "username")
    private String username;
    /**
     * 密码
     */
    @ApiModelProperty(value = "密码")
    @TableField(value = "password")
    private String password;
    /**
     * 创建时间
     */
    @ApiModelProperty(value = "创建时间")
    @TableField(value = "create_time",fill = FieldFill.INSERT)
    private LocalDateTime createTime;
    /**
     * 更新时间
     */
    @ApiModelProperty(value = "更新时间")
    @TableField(value = "update_time",fill = FieldFill.UPDATE)
    private LocalDateTime updateTime;
    /**
     * 逻辑删除
     */
    @ApiModelProperty(value = "逻辑删除")
    @TableLogic
    @TableField(value = "is_delete",select = false)
    private Boolean isDelete;
    /**
     * 角色集合
     */
    @ApiModelProperty(value = "角色集合")
    @TableField(exist = false)
    private List<Role> roles;

}